﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AMS.DataAccess.Interfaces;
using AMS.DataAccess.BO;

public partial class Customer_GetCustomerContactorDlg : BaseWorkPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Utils.ParseIntQueryString(Request, "customer", ref customerId))
        {
            Server.Transfer("~/Error.aspx?msg=time out");
            return;
        }

        if (!IsPostBack)
        {
            DoDataBind();
        }
    }

    int customerId;

    void DoDataBind()
    {
        IContactorManager mgr = ManagerFactory.CreateContactorManager();
        List<ContactorInfo> contactors = mgr.GetCustomerContactors(CallContext, customerId);
        gv.DataSource = contactors;
        gv.DataBind();
    }
}
